const state = {
  alarmGroup: null,
  alarmFilter: '',
  spreadGroupList: {},
  alarmGroupFilter: ''
}
const getters = {
  renderStatus (state) {
    // 承载变化的version
    return state.alarmGroup
  }
}
const mutations = {
  pushAlarmGroup (state, items) {
    // 如何变化version,插入items
    state.alarmGroup = items
  },
  pushAlarmFilter (state, items) {
    state.alarmFilter = items
  },
  pushSpreadGroupList (state, items) {
    state.spreadGroupList = items
  },
  PushAlarmGroupFilter (state, items) {
    state.alarmGroupFilter = items
  }
}
const actions = {
  invokePushAlarmGroup (context, item) {
    // 触发mutations里面的pushVersion ,传入数据形参item 对应到items
    // if (Object.prototype.toString.call(item) === '[object Object]') {
    context.commit('pushAlarmGroup', item)
    // }
  },
  invokePushAlarmFilter (context, item) {
    // 触发mutations里面的pushVersion ,传入数据形参item 对应到items
    // if (Object.prototype.toString.call(item) === '[object Object]') {
    context.commit('pushAlarmFilter', item)
    // }
  },
  invokePushSpreadGroupList (context, item) {
    // 触发mutations里面的pushVersion ,传入数据形参item 对应到items
    // if (Object.prototype.toString.call(item) === '[object Object]') {
    context.commit('pushSpreadGroupList', item)
    // }
  },
  invokePushAlarmGroupFilter (context, item) {
    // 触发mutations里面的pushVersion ,传入数据形参item 对应到items
    // if (Object.prototype.toString.call(item) === '[object Object]') {
    context.commit('PushAlarmGroupFilter', item)
    // }
  }
}
export default {
  namespaced: true, // 用于在全局引用此文件里的方法时标识这一个的文件名
  state,
  getters,
  mutations,
  actions
}
